package com.jr9z.jrjz.dao;

import com.jr9z.jrjz.entity.ClassicCase;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ClassicCaseMapper {
    int deleteByPrimaryKey(Integer classicId);

    int insert(ClassicCase record);

    int insertSelective(ClassicCase record);

    ClassicCase selectByPrimaryKey(Integer classicId);

    int updateByPrimaryKeySelective(ClassicCase record);

    int updateByPrimaryKeyWithBLOBs(ClassicCase record);

    int updateByPrimaryKey(ClassicCase record);

    /**
     * @Description:查找当前最大的sort值
     * @date: 17:44 2019-3-29
     * @param:
     * @return: int
     */
    Integer selectMaxSort();


    /**
     * 上移
     * @param sort
     * @return
     */
    ClassicCase moveUp(Integer sort);

    /**
     *  下移
     * @param sort
     * @return
     */
    ClassicCase moveDown(Integer sort);

    /**
     * 获取经典案例列表
     * @return
     */
    List<ClassicCase> getClassicList();

    /**
     * 获取经典案例的总数
     * @return
     */
    Long getClassicCount();
}